package com.bjpowernode.dataservice;

import com.bjpowernode.commons.service.ProductService;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.bjpowernode.dataservice.mapper")
@EnableDubbo // 启用dubbo
@EnableScheduling // 启用定时任务
public class YlbServiceApplication {

    public static void main(String[] args) {
        // 获取Spring的容器对象
        BeanFactory beanFactory = SpringApplication.run(YlbServiceApplication.class, args);
        ProductService productService = beanFactory.getBean(ProductService.class);
        productService.scanFullProduct();
    }

}
